package com.baibei.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * 收支记录实体对象
 * {
 * "moneyLogId": "流水表ID",
 * "money": "金额",
 * "balance": "余额(结余)",
 * "reType": "出入金类型，(4：提现，3：充值，2:涨（现货价订货）,1:跌（结算价订货）)",
 * "proDesc": "交易产品（红酒）名字",
 * "addTime": "创建时间"
 * }
 * Created by shenminjie on 2017/8/9.
 * mail:shenminjie@100bei.com
 */

public class PaymentRecordInfo implements Serializable ,DateInfo, Parcelable {
    private int moneyLogId;

    private String proDesc;

    private double money;

    private int reType;

    private double balance;

    private int payType;

    private String remark;

    private String wid;

    private long addTime;

    private String orderNumber;

    private int fee;

    private String userId;

    private String orderId;

    private int orderType;

    private String orderTypeStr;

    private String productId;

    private int buyMoney;

    private int count;

    private double plAmount;

    public int getMoneyLogId() {
        return moneyLogId;
    }

    public void setMoneyLogId(int moneyLogId) {
        this.moneyLogId = moneyLogId;
    }

    public String getProDesc() {
        return proDesc;
    }

    public void setProDesc(String proDesc) {
        this.proDesc = proDesc;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public int getReType() {
        return reType;
    }

    public void setReType(int reType) {
        this.reType = reType;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public int getPayType() {
        return payType;
    }

    public void setPayType(int payType) {
        this.payType = payType;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getWid() {
        return wid;
    }

    public void setWid(String wid) {
        this.wid = wid;
    }

    public long getAddTime() {
        return addTime;
    }

    public void setAddTime(long addTime) {
        this.addTime = addTime;
    }

    @Override
    public String toString() {
        return "PaymentRecordInfo{" +
                "moneyLogId=" + moneyLogId +
                ", proDesc='" + proDesc + '\'' +
                ", money=" + money +
                ", reType=" + reType +
                ", balance=" + balance +
                ", payType=" + payType +
                ", remark='" + remark + '\'' +
                ", wid='" + wid + '\'' +
                ", addTime=" + addTime +
                ", orderNumber='" + orderNumber + '\'' +
                ", fee=" + fee +
                ", userId='" + userId + '\'' +
                ", orderId='" + orderId + '\'' +
                ", orderType=" + orderType +
                ", orderTypeStr='" + orderTypeStr + '\'' +
                ", productId='" + productId + '\'' +
                ", buyMoney=" + buyMoney +
                ", count=" + count +
                ", plAmount=" + plAmount +
                '}';
    }

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public int getFee() {
        return fee;
    }

    public void setFee(int fee) {
        this.fee = fee;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public int getOrderType() {
        return orderType;
    }

    public void setOrderType(int orderType) {
        this.orderType = orderType;
    }

    public String getOrderTypeStr() {
        return orderTypeStr;
    }

    public void setOrderTypeStr(String orderTypeStr) {
        this.orderTypeStr = orderTypeStr;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public int getBuyMoney() {
        return buyMoney;
    }

    public void setBuyMoney(int buyMoney) {
        this.buyMoney = buyMoney;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public double getPlAmount() {
        return plAmount;
    }

    public void setPlAmount(double plAmount) {
        this.plAmount = plAmount;
    }


    @Override
    public long getDate() {
        return addTime;
    }

    public PaymentRecordInfo() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.moneyLogId);
        dest.writeString(this.proDesc);
        dest.writeDouble(this.money);
        dest.writeInt(this.reType);
        dest.writeDouble(this.balance);
        dest.writeInt(this.payType);
        dest.writeString(this.remark);
        dest.writeString(this.wid);
        dest.writeLong(this.addTime);
        dest.writeString(this.orderNumber);
        dest.writeInt(this.fee);
        dest.writeString(this.userId);
        dest.writeString(this.orderId);
        dest.writeInt(this.orderType);
        dest.writeString(this.orderTypeStr);
        dest.writeString(this.productId);
        dest.writeInt(this.buyMoney);
        dest.writeInt(this.count);
        dest.writeDouble(this.plAmount);
    }

    protected PaymentRecordInfo(Parcel in) {
        this.moneyLogId = in.readInt();
        this.proDesc = in.readString();
        this.money = in.readDouble();
        this.reType = in.readInt();
        this.balance = in.readDouble();
        this.payType = in.readInt();
        this.remark = in.readString();
        this.wid = in.readString();
        this.addTime = in.readLong();
        this.orderNumber = in.readString();
        this.fee = in.readInt();
        this.userId = in.readString();
        this.orderId = in.readString();
        this.orderType = in.readInt();
        this.orderTypeStr = in.readString();
        this.productId = in.readString();
        this.buyMoney = in.readInt();
        this.count = in.readInt();
        this.plAmount = in.readDouble();
    }

    public static final Creator<PaymentRecordInfo> CREATOR = new Creator<PaymentRecordInfo>() {
        @Override
        public PaymentRecordInfo createFromParcel(Parcel source) {
            return new PaymentRecordInfo(source);
        }

        @Override
        public PaymentRecordInfo[] newArray(int size) {
            return new PaymentRecordInfo[size];
        }
    };
}
